﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="Users.aspx.cs" Inherits="FHost1.Admin.Users" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#MainContent_btnSearch").button();
        });
    
    </script>
    <h2>
        Users ...</h2>
    <div style="margin: 20px;">
        <asp:TextBox ID="txtSearch" Width="500px" CssClass="searchtxt ui-accordion ui-corner-all"
            runat="server" />
        &nbsp;
        <asp:Button ID="btnSearch" runat="server" Text="Search user" OnClick="btnSearch_Click" />
        <br />
        <hr />
        <asp:GridView ID="GridUsers" runat="server" AutoGenerateColumns="False" BackColor="White"
            BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" Width="98%"
            EmptyDataText="No user data found" ForeColor="Black" GridLines="Vertical">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="UserID" HeaderText="User ID" ItemStyle-Width="50px">
                    <ItemStyle Width="50px"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField DataField="Username" HeaderText="Username" />
                <asp:BoundField DataField="FullName" HeaderText="Full Name" />
                <asp:BoundField DataField="EmailID" HeaderText="Email ID" />
                <asp:TemplateField ItemStyle-Width="100px">
                    <ItemTemplate>
                        <a href="Uploads.aspx?uid=<%# DataBinder.Eval(Container.DataItem, "UserID") %>">View</a>
                    </ItemTemplate>
                    <ItemStyle Width="100px"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="100px">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkDelete" UID='<%# DataBinder.Eval(Container.DataItem, "UserID") %>' OnClientClick="return confirm('Are you sure want to delete this user and its folder/files?');"
                            runat="server" OnClick="lnkDelete_Click">Del</asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle Width="100px"></ItemStyle>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#F7F7DE" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FBFBF2" />
            <SortedAscendingHeaderStyle BackColor="#848384" />
            <SortedDescendingCellStyle BackColor="#EAEAD3" />
            <SortedDescendingHeaderStyle BackColor="#575357" />
        </asp:GridView>
    </div>
    
    <div  style="float:right;">
    <asp:ImageButton ID="btnPrev" ToolTip="Previous" ImageUrl="~/images/prev-icon.png" 
            runat="server" onclick="btnPrev_Click" />
    <asp:ImageButton ID="btnNext" ToolTip="Next" ImageUrl="~/images/next-icon.png" 
            runat="server" onclick="btnNext_Click" />
    </div>
</asp:Content>
